<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<title>Galería de imagenes con etiquetas</title>

<link href="/css/style.css" rel="stylesheet" type="text/css" />

<link href="/css/basic.css" rel="stylesheet" type="text/css" />

<link href="/css/wordcloud.css" rel="stylesheet" type="text/css" />

<link href="/css/slideshow.css" rel="stylesheet" type="text/css" />

<link href="/css/mbGallery.css" rel="stylesheet" type="text/css" />

<link href="/css/form.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="js/jquery-1.3.1.js"></script>

<script type="text/javascript" src="js/jquery-navegar.js"></script>

<script type="text/javascript" src="js/jquery.aslideshow.js"></script>

<script type="text/javascript" src="js/jquery.mbgallery.js"></script>

<script type="text/javascript" src="js/form.imageadd.js"></script>

</head>

<body>
	
<table id="outer" align="center" border="0" cellpadding="0" cellspacing="0">
    <tbody>
        <tr>
            <td class="tag" height="90">
            	<a href="/" >
            	<span class="logo"><img src="img/logo.png" border="0"/></span>
				</a>
                <span class="name">Galería para todos!</span>
                <br/>
                rápida búsque con palabras...
            </td>
        </tr>

        <tr>
            <td>
                <table border="0" cellpadding="0" cellspacing="0">
                    <tbody>
                        <tr>
                            <td id="left" valign="top">
                                <table id="menu" border="0" cellpadding="0" cellspacing="0" width="100%">
                                    <tbody>
                                        <tr>
                                            <td height="20">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="toplinks" id="image-gallery">
                                                <a name="image-gallery" href="#">Ver mis imágenes</a>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="toplinks" id="label-gallery">
                                                <a name="label-gallery" href="#">Ver etiquetas</a>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="toplinks" id="image-add">
                                                <a name="image-add" href="#">Agregar nueva imágen</a>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="toplinks" id="about">
                                                <a name="about" href="#">Sobre la aplicación</a>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </td>
                            <td id="center" valign="top">
                                <div id="main">
                                	<?php
										$msg = ($_GET['msg']!=null) ? $_GET['msg'] : '';
										
										if($msg == 1) echo '<div class="confirmed">La imágen ha sido creada satisfactoriamente</div>';
										if($msg == 2) echo '<div class="warning">La imágen NO se ha podido eliminar </div>';
									?>

								
								
								
<table class="misimagenes" align="center" border="0" cellpadding="0" cellspacing="0">
    <tbody>
        <tr>
            <td>
            	<?php
					
					require_once("model/Foto.php");

					$key = ($_GET['palabra'] == null) ? '' : $_GET['palabra'];
		
					$foto = new Foto();
					
					$images = $foto->index();
		
					foreach($images as $image):	
						
				?>
				
				<img title="<?php echo $image['etiquetas']; ?>" src='<?php echo $image['dir']; ?>' name='<?php echo $image['name']; ?>' />
				
				<?php
				
				endforeach;
				
				?>
            </td>
		</tr>                                      
    </tbody>
</table>
<script type="text/javascript">

	$(document).ready(function(){
	
		$('.misimagenes td').slideshow({
			title:true,
	        width:500,
	        height:500,
			playframe:true,
			play:false,
			effect:'fade',
			effecttime:1000,
			help:'Efectos para expocision de'+': <a href="http://yfreee.wordpress.com">yfreee</a>',//',
			panel:true
		});
	});
	
</script>
								

								</div>	
                            </td>

                            <td id="right">
                            	<br><br><br>
                                <table class="masetiquetadas" align="center" border="0" cellpadding="0" cellspacing="0">
                                    <tbody>
                                        <tr>
                                            <td width="50px">

												<?php
												
												$topfoto = new Foto();
												
												$images = $topfoto->index();
												
												if(count($images)>0):
												?>
													
												<?php
													
													foreach($images as $image):
												
														?>		
														
														<img title="<?php echo $image['nombre']; ?>" src="<?php echo $image['dir']; ?>" />
															
														<?php
											
													endforeach;
												
												?>
												
												<?php
											
												endif;
												
												?>
													
                                            </td>
										</tr>
                                        <tr>
                                            <td width="50px">
                                                	<img src=""/>
                                            </td>
                                        </tr>
																				
                                        <tr>
                                            <td width="50px">
                                                	<img src="img/1.jpg"/>
                                                	<img src="img/2.jpg"/>
                                                	<img src="img/3.jpg"/>
                                                	<img src="img/4.jpg"/>
                                                	<img src="img/5.jpg"/>
                                            </td>
										</tr>

                                        <tr>
                                            <td width="50px">
                                                	<img src=""/>
                                            </td>
                                        </tr>                                        
                                    </tbody>
                                </table>
								
								<script type="text/javascript">

									$(document).ready(function(){
									
										$('.masetiquetadas td').slideshow({
											title:false,
									        width:100,
									        height:100,
											playframe:false,
											play:true,
											effect:'fade',
											effecttime:1000,
											help:'Efectos para expocision de'+': <a href="http://yfreee.wordpress.com">yfreee</a>',//',
											panel:false
										});
									});
									
								</script>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </td>
        </tr>
		
        <tr>
            <td align="center">
            	<div id="footer">

                Creado por: <a href="mailto:yfreee@gmail.com">yfreee</a>
                 | 
                Informacion <a href="http://yfreee.wordpress.com" target="_blank">yfreee</a>
				            		
            	</div>
            </td>
        </tr>
				
    </tbody>
</table>

</body>

</html>